package edu.wpi.first.wpilibj.templates.commands;

import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj.templates.OperatorInterface;
import edu.wpi.first.wpilibj.templates.subsystems.DriveTrain;
import edu.wpi.first.wpilibj.templates.subsystems.Lifter;
import edu.wpi.first.wpilibj.templates.subsystems.Shooter;
import edu.wpi.first.wpilibj.templates.subsystems.Feeder;
import edu.wpi.first.wpilibj.templates.subsystems.Wedge;
import edu.wpi.first.wpilibj.templates.subsystems.ShooterPitch;


/**
 * The base for all commands. All atomic commands should subclass CommandBase.
 * CommandBase stores creates and stores each control system. To access a
 * subsystem elsewhere in your code in your code use CommandBase.exampleSubsystem
 * @author Author
 */
public abstract class CommandBase extends Command {

    public static OperatorInterface MyOperatorInterface;
    
    // Create a single static instance of all of your subsystems
    public static DriveTrain MyDriveTrain = new DriveTrain();
    public static Lifter MyLifter = new Lifter();
    public static Shooter MyShooter = new Shooter();
    public static Feeder MyFeeder = new Feeder();
    public static Wedge MyWedge = new Wedge();
    public static ShooterPitch MyShooterPitch = new ShooterPitch();

    public static void init() {
        // This MUST be here. If the OI creates Commands (which it very likely
        // will), constructing it during the construction of CommandBase (from
        // which commands extend), subsystems are not guaranteed to be
        // yet. Thus, their requires() statements may grab null pointers. Bad
        // news. Don't move it.
        MyOperatorInterface = new OperatorInterface();
         
        // Show what command your subsystem is running on the SmartDashboard
        SmartDashboard.putData(MyDriveTrain);
        SmartDashboard.putData(MyLifter);
        SmartDashboard.putData(MyShooter);
        SmartDashboard.putData(MyFeeder);
        SmartDashboard.putData(MyWedge);
        SmartDashboard.putData(MyShooterPitch);
    }

    public CommandBase(String name) {
        super(name);
    }

    public CommandBase() {
        super();
    }
}
